import { defineStore } from "pinia"
import config from "@/config"

export const useAiChatStore = defineStore("aiChat", {
  state: () => ({
    messages: [config.messages[0]]
  }),
  actions: {
    addMessage(message) {
      this.messages.push(message)
    },
    resetMessages() {
      this.messages = [config.messages[0]]
    }
  },
  getters: {
    getMessages: (state) => state.messages
  }
})
